-
Notifications
You must be signed in to change notification settings - Fork 1.2k
refactor(client:main): use controller as, named function, new name #1243
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Conversation
9c3e3e3
to
17af68f
Compare
@@ -6,10 +6,12 @@ angular.module '<%= scriptAppName %>' | |||
.when '/', | |||
templateUrl: 'app/main/main.html' | |||
controller: 'MainCtrl' |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Should be MainController
a959473
to
bcf664f
Compare
@kingcody I'm having trouble figuring out why that last test case is failing with CoffeeScript. Mind taking a look? |
|
||
MainController = ($scope, $http<% if (filters.socketio) { %>, socket<% } %>) -> | ||
self = this | ||
@awesomeThings = [] | ||
$http.get('/api/things').then (response) -> |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
With no server options this is the last statement in the controller and coffee returns the last statement in a function. Also, when using controller as
syntax if the controller returns a value then it is bound to the scope as the controller. So this
should be the last statement.
ff51c05
to
c8038ce
Compare
Requires #1287 |
controller as main, MainCtrl -> MainController
c8038ce
to
7d7daee
Compare
refactor(client:main): use controller as, named function, new name
controller as main, MainCtrl -> MainController